/**
 * Created by Toma on 2016/5/30
 */

/**
 * 切换菜单项并翻转主要内容
 * @type {{event: Function, run: Function, boxshow: Function, init: Function}}
 */
var signLoc = {
  event: function (ele) {
    $(ele).on('click',signLoc.run);
  },
  run: function () {
    $(this).addClass('active').siblings().removeClass('active');
    signLoc.boxshow($(this).data('id'));
  },
  boxshow: function (id) {
    $('.cant-box[data-id="'+id+'"]').removeClass('hide-box').siblings().addClass('hide-box');
  },
  init: function (ele) {
    this.event(ele);
  }
};


/**
 * main
 */
(function () {
  signLoc.init('.aitem');
})();